<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
if (!defined('BASEPATH'))
exit('No direct script access allowed');
session_start();

class Wap extends CI_Controller {

	function __construct() {
		parent::__construct();
		$this->load->library('session');
		$this->load->helper('url');
		$this->load->library('upload');
		$this->load->library('pagination');
		$this->load->library('parser');
		$this->load->helper('cookie');
		$this->upload->set_allowed_types('*');
		$this->load->helper(array('form', 'url'));
		@session_start();
	}

	public function index(){
		if ($this->session->userdata('userid') == null) {
			redirect('user/login');
		} else {
			$this->load->model('wap_model');
			$data['list_wap'] = $this->wap_model->list_wap_user($this->session->userdata('userid'));
			$userid =  $this->session->userdata('userid');
			$data['userid'] = $userid;
			$this->load->view('user/dashboard',$data);
		}
	}

}